<?php 

if(!defined('ADMIN')){
	exit('Access Denied');
}


$mname="相关产品";

?>
<div class="pageHeader">
	<p class="topnam"><b>内容发布 > 相关商品</b> > <?=$ralategname?></p>
</div>
<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="<?=$page?>" />
	<input type="hidden" name="numPerPage" value="<?=$pagesize?>" />
	<input type="hidden" name="orderField" value="<?=$orderField?>" />
	<input type="hidden" name="orderDirection" value="<?=$orderDirection?>" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?=u(MOD,'relate',array('q'=>$q,'gid'=>$gid,'relatecatid'=>$relatecatid))?>" method="post">
	<div class="searchBar">
		<ul class="searchContent">
        <table class="searchContent">
        <tr><td>查询内容：<input type="text" name="q" value="<?=$q?>" /></td>
        <td><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></td>
        </tr>
        </table>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?=u(MOD,'addrealte',array("gid"=>$gid))?>" target="dialog" rel="relate<?=$gid?>" title="添加相关产品" width="650" height="480" ><span>添加相关产品</span></a></li>
			<li><a title="确实要移除选择的<?=$mname?>吗?" target="selectedTodo" rel="ids[]" href="<?=u(MOD,'delrelate')?>" class="delete"><span>移除</span></a></li>
			
			<li class="line">line</li>

            <li><a title="标准配件列表" target="navTab" rel="page<?=$catid?>" href="<?=u(MOD,'relate',array("gid"=>$gid,"relatecatid"=>1))?>" class="list99"><span>标准配件列表</span></a></li>
            <li><a title="升级配件列表" target="navTab" rel="page<?=$catid?>" href="<?=u(MOD,'relate',array("gid"=>$gid,"relatecatid"=>2))?>" class="list99"><span>升级配件列表</span></a></li>
            <li><a title="通用配件列表" target="navTab" rel="page<?=$catid?>" href="<?=u(MOD,'relate',array("gid"=>$gid,"relatecatid"=>3))?>" class="list99"><span>通用配件列表</span></a></li>
            <li><a title="螺丝类列表" target="navTab" rel="page<?=$catid?>" href="<?=u(MOD,'relate',array("gid"=>$gid,"relatecatid"=>4))?>" class="list99"><span>螺丝类列表</span></a></li>
            <li><a title="其他需求列表" target="navTab" rel="page<?=$catid?>" href="<?=u(MOD,'relate',array("gid"=>$gid,"relatecatid"=>5))?>" class="list99"><span>其他需求列表</span></a></li>
            
		</ul>
	</div>
<form method="post" action="<?=u(MOD,'list')?>&id=<?=$id?>" rel="pagerForm"  onsubmit="return navTabSearch(this);">
<input type="hidden" name="sub" value="save" />
<input type="hidden" name="catid" value="<?=$catid?>" />  
	<table class="table" width="100%" layoutH="148">
		<thead>
			<tr>
				<th width="25"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="50" class="center">ID</th>
                <th width="100" class="center">相关类别</th>
				<th orderField="title">产品名称</th>
                
                <th width="100" class="center">产品类别</th>
				<th width="120" class="center">操作</th>
			</tr>
		</thead>
        <tbody>
        <?php foreach ($row as $r){?>
		<tr target="id" rel="<?=$r["rid"]?>" style="height: 25px;line-height: 25px;">
				<td class="center"><input name="ids[]" value="<?=$r["rid"]?>" type="checkbox" /></td>
				<td class="center"><?=$r["rid"]?></td>
                <td class="center"><?=$goods_relate_list[$r["relatecatid"]]?></td>
				<td class="contenttitle"><?=$r["title"]?>
                </td>
                <td class="center"><?=$r["catname"]?></td>
				<td class="center">
                   
                    <a title="移除“<?=$r["title"]?>”？" target="ajaxTodo" href="<?=u(MOD,'delrelate',array('id'=>$r['rid']))?>" class="btnDel">移除</a>
				</td>
		</tr>
        <?php }?>   
		</tbody>
	</table>            
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})" id="PageSize">
				<option value="20" <? if($pagesize==20){ echo 'selected="true"';}?>>20</option>
				<option value="50" <? if($pagesize==50){ echo 'selected="true"';}?>>50</option>
				<option value="100" <? if($pagesize==100){ echo 'selected="true"';}?>>100</option>
				<option value="200" <? if($pagesize==200){ echo 'selected="true"';}?>>200</option>
			</select>
			<span>条，共<?php echo $total;?>条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="<?php echo $total;?>" numPerPage="<?=$pagesize?>" pageNumShown="10" currentPage="<?=$page?>"></div>

	</div>
<!-- 
<div class="formBar">
<ul style="float:left;">
<li style="line-height: 30px;height: 30px;"><div style="width: 420px;"><a class="btnLook" href="<?=u("content","posids",array("v"=>""))?>" lookupGroup="posids" style="float:right">选择推荐位</a>选择推荐位：
<input name="posids.id" value="" id="positionids" type="hidden" /><input type="text" name="posids.orgName" style="width:300px"  value="" class="lookup" />
        
        <input class="readonly" name="posids.orgNum" readonly="readonly" type="hidden" /></div>
</li>
<li><div class="buttonActive"><div class="buttonContent"><button type="submit">推送到推荐位 </button></div></div></li>
</ul>
</div>
-->
</form>     
</div>    
